package com.lin.cloud.disk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lin.cloud.disk.entity.pojo.DepartmentPermission;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * (DepartmentPermission)表数据库访问层
 *
 * @author ljc
 * @since 2020-12-10 16:47:09
 */
@Repository
public interface DepartmentPermissionMapper extends BaseMapper<DepartmentPermission> {

    /**
     * 查询权限ID列表 通过部门ID列表
     * @param departmentIdList
     * @return
     */
    List<Long> selectPermissionIdListByDepartmentIdList(@Param("departmentIdList") List<Long> departmentIdList);

    /**
     *  批量添加部门授权记录
     * @param departmentPermissionList
     */
    void batchInsertDepartmentPermission(@Param("departmentPermissionList") List<DepartmentPermission> departmentPermissionList);

    /**
     * 批量删除部门授权记录
     * @param departmentPermissionIdList
     */
    void batchDeleteDepartmentPermission(@Param("departmentId") Long departmentId ,@Param("departmentPermissionIdList")List<Long> departmentPermissionIdList);
}